from selenium import webdriver
import time
import os
from selenium.webdriver.common.action_chains import ActionChains

driver = webdriver.Chrome()
url = "file:///"+os.path.abspath("C:\\课件\\我的课件\\测试\\selenium2/locateElement/selenium2html/send.html")
driver.get(url)
driver.maximize_window()
time.sleep(3)

driver.find_element_by_tag_name("input").click()
time.sleep(3)
# 先获得弹出框的操作句柄
alert = driver.switch_to.alert
alert.send_keys("春招冲刺班")

time.sleep(4)
# 关闭信息展示弹框
alert.accept()

time.sleep(6)

driver.quit()
